package org.corey.share.db.dao;

import java.util.Date;

import org.corey.share.db.entity.Article;
import org.corey.share.misc.PageData;

public interface ArticleDao {
	public boolean saveArticle(Article article);

	public boolean removeArticle(Long id);

	public boolean updateArticle(Article article);

	public PageData<Article> loadArticlesbyCatogory(int pageSize, int pageIndex, String orderBy,Long catotoryId);

	public PageData<Article> loadArticlesWroteBetween(int pageSize, int pageIndex,Date start, Date end);

	public Article loadArticle(Long id);
	
	public PageData<Article> loadAllArticles(int pageSize, int pageIndex,String orderBy);
	
	public int getArticleCountInCatogory(Long catogoryId);
}
